//删除页面的所有video的dom
var   video  = document.getElementsByTagName("video");
if(typeof(video)!="undefined"){
    for (var i = 0; i < video.length; i++){
        video[i].parentNode.parentNode.innerHTML = "<span style='color: black; font-size:24px; background-color: white;'> 亲爱的小主,已经为你屏蔽了广告视频哦!</span>";
    }
}

//删除音频
var  audio = document.getElementsByTagName("audio");
if(typeof(audio)!="undefined"){
    for (var i = 0; i < audio.length; i++){
        audio[i].pause();
        audio[i].parentNode.remove();
    }
}


//优酷的盒子,针对优酷的优化
var temp = document.getElementsByClassName("h5-ext-layer");
if(typeof(temp)!="undefined"){
    for (var i = 0; i < temp.length; i++){
       temp[i].parentNode.innerHTML = "<span style='color: black; font-size:24px; background-color: white;'> 亲爱的小主,已经为你屏蔽了广告视频哦!</span>";
     }
    
}












